package com.jackie.coupon.customer.service;

import com.jackie.coupon.claculation.api.ShoppingCart;
import com.jackie.coupon.claculation.api.SimulationOrder;
import com.jackie.coupon.claculation.api.SimulationResponse;
import com.jackie.coupon.customer.api.bean.SearchCoupon;
import com.jackie.coupon.customer.dao.entity.Coupon;
import com.jackie.coupon.template.api.beans.CouponInfo;
import com.jackie.coupon.customer.api.bean.RequestCoupon;

import java.util.List;

/**
 * CouponCustomerService
 *
 * @author Jackie Hou
 * @date 2023/11/19 10:58
 * @version 1.0
 */
public interface CouponCustomerService {

    /**
     * 领券
     * @param request
     * @return
     */
    Coupon requestConpon(RequestCoupon request);

    /**
     * 核销
     * @param cart
     * @return
     */
    ShoppingCart placeOrder(ShoppingCart cart);


    /**
     * 试算
     * @param order
     * @return
     */
    SimulationResponse simulateOrderPrice(SimulationOrder order);


    void deleteCoupon(Long userId, Long couponId);

    /**
     * 查询用户的优惠券
     * @param request
     * @return
     */
    List<CouponInfo> findCoupon(SearchCoupon request);
}
